package com.android.data;

public class EventManager {

	/*public static ArrayList<Group> getCinemas(Context context) {
		ArrayList<Group> cinemasGroups = new ArrayList<Group>(); 
		
		String baseURL = context.getString(R.string.webserviceURL);
		String completeURL = baseURL + "cinemas";		
		JSONObject result = RestClient.getResponse(completeURL);
		
		return cinemasGroups;
	}
	
	public static ArrayList<Group> getTheaters(Context context) {
		ArrayList<Group> theatersGroups = new ArrayList<Group>(); 
		
		String baseURL = context.getString(R.string.webserviceURL);
		String completeURL = baseURL + "theaters";		
		JSONObject result = RestClient.getResponse(completeURL);
		
		return theatersGroups;
	}

	public static ArrayList<Group> getEvents(Context context) {
		ArrayList<Group> theatersGroups = new ArrayList<Group>(); 
		
		String baseURL = context.getString(R.string.webserviceURL);
		String completeURL = baseURL + "events";		
		JSONObject result = RestClient.getResponse(completeURL);
		
		if (!result.has("events"))
			return theatersGroups;
		
		try {
			JSONArray events = result.getJSONArray("events");
			
			for (int i = 0; i < events.length(); i++) {
				JSONObject eventObj = events.getJSONObject(i);
				
			}
			
		} catch (JSONException e) {
			e.printStackTrace();
		}
		
		return theatersGroups;
	}

	public static ArrayList<Group> getVenues(Context context) {
		ArrayList<Group> theatersGroups = new ArrayList<Group>(); 
		
		String baseURL = context.getString(R.string.webserviceURL);
		String completeURL = baseURL + "venues";		
		JSONObject result = RestClient.getResponse(completeURL);
		
		return theatersGroups;
	}*/

}
